#ifndef _DEBUG_H_
#define _DEBUG_H_

#include <stdint.h>
#include <stdarg.h>

#include "debug_uart.h"

typedef enum {
	LOG_DEBUG,
	LOG_ERROR,
	LOG_LOG,
	LOG_5G,
	LOG_5GUART,
	LOG_MQTT,
	LOG_RTK,
	LOG_BY,
	LOG_BYUART,
	LOG_ADC,
	LOG_LEVEL_SIZE,
}loglevel_t;


#define logErr(...)				log_printf_info(LOG_ERROR, __VA_ARGS__)
#define log5G(...)				log_printf_info(LOG_5G, __VA_ARGS__)
#define log5GUART(...)			log_printf_info(LOG_5GUART, __VA_ARGS__)
#define log5GHEX(a,b)			log_printf_hex(a,b)
#define logRTK(...)				log_printf_info(LOG_RTK, __VA_ARGS__)
#define logMQTT(...)			log_printf_info(LOG_MQTT, __VA_ARGS__)
#define logBY(...)				log_printf_info(LOG_BY, __VA_ARGS__)
#define logBYUART(...)			log_printf_info(LOG_BYUART, __VA_ARGS__)
#define logADC(...)				log_printf_info(LOG_ADC, __VA_ARGS__)

void log_printf_info(loglevel_t loglevel, char* fmt,...);
void log_printf_hex(const char * txBuff, uint32_t txSize);

#endif
